//
// Created by Kqj on 25-8-26.
//

#ifndef IPS_LCD_154INCH_LCD_H
#define IPS_LCD_154INCH_LCD_H

#define     RED          0XF800	  //红色
#define     GREEN        0X07E0	  //绿色
#define     BLUE         0X001F	  //蓝色
#define     WHITE        0XFFFF	  //白色


#include <sys/types.h>
#include <stdbool.h>
#include "stm32f1xx_hal.h"
extern SPI_HandleTypeDef hspi1;

#define red    0xf800	//定义红色
#define blue   0x001f	//定义蓝色
#define green  0x07e0 	//定义绿色
#define deep_green  0x0600 	//定义深绿色
#define white  0xffff 	//定义白色
#define black  0x0000 	//定义黑色
#define orange 0xfc08 	//定义橙色
#define yellow 0xffe0	//定义黄色
#define pink   0xf3f3 	//定义粉红色
#define purple 0xa1d6	 //定义紫色
#define brown  0x8200	 //定义棕色
#define gray   0xc618	 //定义灰色
#define light_blue   0x2f3e	 //定义浅蓝色
#define light_black  0xc618	 //定义浅蓝色

#define Enable 0
#define Disable 1


#define 手 0
#define 动 1
#define 模 2
#define 式 3
#define 恒 4
#define 压 5
#define 功 6
#define 率 7
#define 最 8
#define 小 9
#define 阈 10
#define 值 11
#define 大 12
#define 度 13

#define 手动模式 0
#define 恒压模式 1
#define 恒压功率 2
#define 最大阈值 3
#define 最小阈值 4



void lcd_initial();
void LCD_Fill(uint32_t sx,uint32_t sy,uint32_t ex,uint32_t ey,int color_data);
void  lcd_cs(bool ctrl);
void TFT_clear(void);
//void show_info();
//void show_info2();
void display_point(unsigned int x,unsigned int y,unsigned long color);
void display_char16_16(unsigned int x,unsigned int y,unsigned long color,unsigned char word_serial_number);
void display_char8_16(unsigned int x,unsigned int y,unsigned long color,unsigned char word_serial_number);
void clean_char8_16(unsigned int x,unsigned int y,unsigned long color,unsigned char word_serial_number);
void clean_char8_80(unsigned int x,unsigned int y,unsigned long color,unsigned char word_serial_number);

void display_line(unsigned int x,unsigned int y,unsigned long color);
#endif //IPS_LCD_154INCH_LCD_H
